package com.javajun.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 * @className: BookClass
 * @description: 书籍类别
 * @author: JavaJun
 * @date: 2018年11月20日
 */
@Entity
public class BookClass {

    private Integer id;
    // 类别名称
    private String name;
    // 备注
    private String remark;
    // 图书， @OneToMany
    // private List<Book> books = new ArrayList<>();
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    /*@OneToMany(fetch=FetchType.LAZY, mappedBy="bookClass")
    public List<Book> getBooks() {
        return books;
    }
    public void setBooks(List<Book> books) {
        this.books = books;
    }*/
    
}
